﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AdmLaboratorios.DTO;
using System.Data;

namespace AdmLaboratorios.DAO
{
    public class OrdenProduccionDAO : DAOBase<OrdenProduccionDTO>
    {
        public DataTable Consulta(string filtro)
        {
            string qry = @"SELECT * 
                            FROM [OrdenProduccion] A
                            JOIN [Partner] B ON A.IdPartner=B.Id
                            JOIN [Producto] C ON A.IdProducto=C.Id";

            if (filtro.Trim() != string.Empty)
                qry = qry + " WHERE " + filtro;

            return GetTable(qry);
        }
    }
}
